//created by: Justina Lee

Ext.define("MajorProjectSenchaTouch.view.OpeningHoursModule.OpeningHours", {
    extend: 'Ext.Container',
    xtype: 'openinghourspage',
    id: 'openinghoursView',
    requires:[
    'Ext.SegmentedButton',
    'MajorProjectSenchaTouch.view.OpeningHoursModule.OpeningHoursMainPanel'
    ],
    
    config: {
        layout:{
            fullscreen: true,
            type:'fit'
        }, 
        cls: 'mainBackgroundColor',
        items:[
        {
            xtype: 'toolbar',
            docked: 'top',
            ui: 'light',
            items:[
            {                
                xtype: 'spacer'
            },
            {
                xtype:'segmentedbutton',
                id:'ohSegmentedBtn',
                allowDepress: true,
                items:[
                {
                    text: 'Term',
                    pressed: true,
                    action: 'goTerm'
                },
                {
                    text: 'Vacation/Term Break',
                    action: 'goVacationBreak'
                }
                ]
            },
            {
                xtype: 'spacer'
            }
            ]
        },
        {
            xtype: 'openinghoursMainBody'
        }
        ],
        listeners:{
            painted: function(){
                this.fireEvent('ohPainted', this);
            }
    }        
    }
});